import React from 'react';
import './index.less';

import config from './config';

const {
    actions,
    methods: {
        render,
        connect
    },
    components: {
        Layout
    }
} = config;

const {Header, Content} = Layout;

const Wrapper = render({
    actions: actions
})(({props, action, state}) => {
    props.use.form('attendance_approve_card')
    const {form, button, attendance, editTable} = props;

    return (
        <Layout
            className="employing-add-page"
        >
            <div className="bill-bg">
                <Header
                    showOrgRefer={false}
                    showButtons={true}
                    button={button}
                    buttonOptions={{
                        area: 'head', //如果页面中的有多个区域有按钮，这里的area当做筛选条件，只渲染按钮的后台数据中area字段为这里指定值的按钮；
                        onButtonClick: (props, btncode) => {
                            action.btnAct.fileManager()
                        }// 按钮的点击事件
                    }}
                >
                    <div className="approve_title">
                        {attendance.language['approve-00001']}{/* 补考勤审批 */}
                    </div>
                </Header>
                <Content>
                    {form.createForm('attendance_approve_card', {})}
                    <div className={'batch_attend_table flex-container'}>
                        {editTable.createEditTable('batch_attend_list', {
                            showCheck: false
                        })}
                    </div>
                </Content>
            </div>
        </Layout>
    );
});

export default connect(Wrapper);